package com.xunce.xcworkservice.exception;

/**
 * @author macmini
 */
public class CustomException extends Exception {
    private final int errorCode;

    // 构造方法
    public CustomException(String message, Integer errorCode) {
        super(message);
        this.errorCode = errorCode;
    }

    public CustomException(String message, Integer errorCode, Throwable cause) {
        super(message, cause);
        this.errorCode = errorCode;
    }

    // 获取错误码的方法
    public int getErrorCode() {
        return errorCode;
    }
}